/**
  \file main.cpp
\brief Main application program

\author © 2011 Enrico Miglino / Tech Consulting (enrico.miglino@ovi.com)
\author "Black Cat Cutting Studio" is protected by the copyright law
\author Distributed under the LGPL 3.0 license.
\version 1.0 alpha
\date 2011

\par Black Cat Cutting Studio licensing notes

    "Black Cat Cutting Studio" is free software: you can redistribute it
    and/or modify it under the terms of the Lesser GNU General Public License
    as published by the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    "Black Cat Cutting Studio" is distributed in the hope that it
    will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    Lesser GNU General Public License for more details.

    You should have received a copy of the Lesser GNU General Public License
    along with "Black Cat Cutting Studio".
    If not, see <http://www.gnu.org/licenses/>.

*/
#include <QtGui/QApplication>
#include "qmlapplicationviewer.h"

/*!
 \brief Main function

 \fn main
 \param argc
 \param argv[]
 \return int
*/
int main(int argc, char *argv[])
{
    QApplication app(argc, argv);

    QCoreApplication::setApplicationName("Black Cat Cutting Studio");
    QCoreApplication::setApplicationVersion("1.0 LGPL 3.0");
    QCoreApplication::setOrganizationName("Black Cat");
    QCoreApplication::addLibraryPath("plugins");

    QmlApplicationViewer viewer;
    viewer.setOrientation(QmlApplicationViewer::ScreenOrientationLockLandscape);

    // Modifications to remove window attributes
    viewer.setStyleSheet("background:transparent;");
    viewer.setAttribute(Qt::WA_TranslucentBackground);
    viewer.setWindowFlags(Qt::FramelessWindowHint);

    // Adapt view to window size
    viewer.setResizeMode(QDeclarativeView::SizeRootObjectToView);
    // Show always in full screen
    viewer.setMainQmlFile(QLatin1String("qml/BlackCat_CuttingStudio/main.qml"));
    viewer.showFullScreen();

    return app.exec();
}
